package cn.bone.ou.community.controller;

import cn.bone.base.bean.CommonResult;
import cn.bone.ou.community.param.CommunityParam;
import cn.bone.ou.community.service.ICommunityService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RequestMapping("/ou/community")
@RestController
public class CommunityController {

    @Resource
    private ICommunityService communityService;

    @RequestMapping("/getInfo")
    public CommonResult getInfo(@Valid CommunityParam.GetInfoParam param){
        return communityService.getInfo(param);
    }

    @RequestMapping("/setInfo")
    public CommonResult setInfo(@Valid CommunityParam.SetInfoParam param){
        return communityService.setInfo(param);
    }

    @RequestMapping("/regionList")
    public CommonResult regionList(){
        return communityService.regionList();
    }
}
